package com.beici.seoserver.service.classBoxInterface;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.beici.seoserver.mapper.classboxAlbumMapper;
import com.beici.seoserver.model.classBox.classboxAlbum;
import com.beici.seoserver.model.resultes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @auther WaterGhost
 * @date 2022/3/22 19:40
 */
@Service
public class classBoxAlbumService {

    @Autowired
    private classboxAlbumMapper classboxAlbumServer;

    public resultes getAlbum(){
        List<classboxAlbum> classboxAlbums = classboxAlbumServer.selectList(new QueryWrapper<classboxAlbum>().select("cb_id","cb_name").orderByDesc("cb_look"));
        return resultes.success(null,classboxAlbums);
    }

    public resultes getAlbumAll(){
        List<classboxAlbum> classboxAlbums = classboxAlbumServer.selectList(new QueryWrapper<classboxAlbum>().select("cb_id", "cb_name").orderByDesc("cb_look"));
        return resultes.success(null,classboxAlbums);

    }
}
